<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBistrosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('bistros', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('head_store_id')->comment('总店id');
            $table->string('name')->comment('店铺名称');
            $table->string('qr_code', 40)->comment('二维码')->unique();
            $table->decimal('start_fee', 10 , 2)->comment('起送费');
            $table->string('address')->comment('地址');
            $table->string('area')->comment('地区');
            $table->string('password')->comment('密码');
            $table->string('account', 40)->comment('店铺账号')->unique();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('bistros');
    }
}
